<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1.0" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/home-billing-ext.css">
    <title>小儿推拿</title>
    <%@ include file="/include/datetables.jsp"%>
</head>
<body>
<div class="Baby_Healthy_home">
    <!--左侧-->
    <jsp:include page="/include/menu.jsp" flush="true">
        <jsp:param name="index" value="1"/>
    </jsp:include>
    <!--右侧-->
    <div class="Baby_Healthy_home_right">
        <div class="Baby_Healthy_home_right_top">
            <span class="Baby_Healthy_home_right_top_tit"><i class="icon iconfont icon-menu2"></i>绿色通道</span>
        </div>
        <div class="Baby_Healthy_home_billing_right_container container_top">
            <div class="Baby_Healthy_home_billing_right_left">
                <dl class="Baby_Healthy_home_billing_left_dl">
                    <dt class="Baby_Healthy_home_billing_left_dt">接诊</dt>
                    <dd id="firstId" class="Baby_Healthy_home_billing_left_dd" rel="1" flage="false">基础信息</dd>
                    <dd class="Baby_Healthy_home_billing_left_dd" rel="2" flage="false">病历信息</dd>
                    <dt class="Baby_Healthy_home_billing_left_dt">诊疗项目</dt>
                    <dd class="Baby_Healthy_home_billing_left_dd" rel="3" flage="false">推拿</dd>
                    <dd class="Baby_Healthy_home_billing_left_dd" rel="4" flage="false">商品</dd>
                </dl>
            </div>
            <%--无信息页面--%>
            <div class="Baby_Healthy_home_billing_right_center">
                <div class="noticeImg" style="background-size:30%"></div>
            </div>
            <%--基础信息--%>
            <div class="Baby_Healthy_home_billing_right_center hidden">
                <div class="billing_right_center_details">
                    <p class="Baby_Healthy_home_billing_right_center_tit">宝宝登记信息</p>
                    <div class="js_patientinfo_wrap">
    
                    </div>
                    <div class="illHistory hidden js_patient_sel_container">
                        <h4 class="billing_right_center_h4">就诊记录</h4>
                        <div class="bespeak_search_container" style="padding-left: 1rem;">
                            <table class="zctable table table-striped table-no-bordered table-hover patientsellist" cellspacing="0" width="100%" style="width:100%">
                                <thead>
                                    <tr class="">
                                        <th class="">就诊时间</th>
                                        <th class="">接诊推拿师</th>
                                        <th class="">就诊门店</th>
                                        <th class="">就诊类型</th>
                                        <th class="">调理类型</th>
                                    </tr>
                                </thead>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
            <%--病历信息--%>
            <div class="Baby_Healthy_home_billing_right_center hidden js_patientcnt_wrap">
                <p class="Baby_Healthy_home_billing_right_center_tit">宝宝病历</p>
                <div class="fast_caseOfIll">
                   <div class="fast_caseOfIll_tit zcusers">
                       <h5 class="tit">病历信息<a style="font-size: 1.2rem;" id="illList" href="javascript:void(0)">查看历史就诊病历</a><a href="javascript:void(0)" onclick="eidtingCase(true)" style="font-size: 1.2rem;" class="edit_btn">编辑</a></h5>
                   </div>
                    <form name="form" class="couponWrapper">
                        <input type="hidden" class="js_treatmentId" name="treatmentId" />
                        <div class="couponOption form-group">
                            <label class="fast_form_group control-label" style="width: 12%;">*发病日期</label>
                            <input id="illData" class="couponInput couponName form_control" name="diseaseTime" type="text" value="" placeholder="年-月-日">
                        </div>
                        <div class="couponOption" style="margin-bottom: 0;">
                            <label class="fast_form_group control-label" style="width: 12%;">*主诉</label>
                            <label class="newCouponWidth light-weight">(必须填写家长最着急需先重点调理的主要症状)</label>
                        </div>
                        <div class="margin-bottom-big" id="mainBoxBefore">
                            <label class="fast_form_group control-label" ></label>
                            <input class="newCouponWidth newIllInput_border form_control" name="diseaseInfo" height="2.5rem" placeholder="必须填写家长最着急需先重点调理的主要症状"/>
                        </div>
                        <div class="couponOption mainBox">
                            <label class="fast_formTipWidth heavy-weight" style="margin-top: 0.5rem;">*主症描述</label>
                            <label class="newCouponWidth light-weight">(兼症必须与主症与主诉相符)</label>
                        </div>
                        <div class="couponOption mainBox">
                            <label class="fast_formTipWidth heavy-weight" style="margin-top: 0.5rem;"></label>
                            <select class="couponInput newWidthTip select_arrow mainList" type="text" name="diseaseArray"></select>
                            <select class="couponInput newWidthTip select_arrow bandList" type="text"></select>
                        </div>
                        <div  id="addMainList" class="newAddBtn likeBlue addBorderLine">+添加</div>
                        <div class="couponOption" id="specialBoxBefore">
                            <label class="fast_formTipWidth heavy-weight" style="line-height:30px;margin-top: 0.5rem;">腺样体专病</label>
                            <label class="light-weight" style="line-height:30px;margin-top: 0.5rem;">(是专病请选中，否则勿选)</label>
                            <input type="checkbox" value="999" rel="off" class="checkBox checkall" id="specialCheck">
                        </div>
                        <div class="couponOption specialScoreBox hidden" style="margin-top: 2rem">
                            <label class="fast_formTipWidth heavy-weight"></label>
                            <label class="newWidthTip heavy-weight">预估评分结果：</label>
                            <label class="newWidthTip" id="checkResultLabel">0%</label>
                        </div>
                        <div class="couponOption specialScoreBox hidden">
                            <label class="fast_formTipWidth heavy-weight"></label>
                            <label class="newWidthTip heavy-weight">鼻腔镜检查结果：</label>
                            <input type="text" id="realScore" style="width: 25px" value="0">
                            <label class="newWidthTip">%  (手动填写)</label>
                        </div>
                        <div class="couponOption specialScoreBox hidden">
                            <label class="fast_formTipWidth heavy-weight"></label>
                            <label class="newWidthTip heavy-weight">误差：</label>
                            <label class="newWidthTip" id="scoreLabel">0%</label>
                        </div>
                        <div class="margin-top-big" style="margin-bottom: 1rem" id="symptomDiv">
                            <label class="fast_formTipWidth heavy-weight">兼症描述</label>
                            <label class="newCouponWidth light-weight">(兼症必须与主症与主诉相符)</label>
                        </div>
                        <div class="couponOption">
                            <label class="fast_formTipWidth heavy-weight"></label>
                            <div class="fast_caseOfIll_select" style="margin-bottom: 0rem"></div>
                        </div>
                        <div class="couponOption">
                            <label class="fast_formTipWidth heavy-weight" style="vertical-align: top;margin-top: 0.5rem;">*诊断结论</label>
                            <select class="newCouponWidth couponDesc" id="selectConclusion" name="conclusionArray" multiple="multiple" style="width: 50.5%;">
                                <option value=""></option>
                            </select>
                        </div>
                        <div class="couponOption">
                            <label class="fast_formTipWidth heavy-weight" style="margin-top: 0.5rem;">*配穴</label>
                            <div class="fast_caseOfIll_pointgroup" style="margin-bottom: 0rem"></div>
                        </div>
                        <div class="couponOption form-group">
                            <label class="fast_form_group heavy-weight" >自主配穴</label>
                            <input class="newCouponWidth newIllInput_border form_control" name="treatmentRemarks" height="2.5rem" placeholder="自主配穴" />
                        </div>
                    </form>
                    <div class="couponOption" style="position:relative;z-index:20;height: 7rem;">
                        <label class="fast_formTipWidth heavy-weight">*舌苔</label>
                        <label class="newCouponWidth light-weight">(拍照请参考右侧示例照片)</label>
                        <form name="imgForm" id="jsImg_1" method="post" enctype="multipart/form-data">
                            <div class="Js_preview previewImd_upLoad" style="left: 6rem;">
                                <img class="imghead" border="0" src="/xrtn-manager/images/newImg.png" width="70" height="60" onclick="changeEditImg(this)"; />
                                <input type="file" name="img" onchange="zcuploadImage(this)" style="display: none;" id="Js_previewImgNew_1" />
                            </div>
                            <input type="hidden" value="" class="Js_previewImgNew_1" />
                        </form>
                        <div class="previewImd_demoImg">
                            <div class="">
                                <img class="img_demo" src="http://admin.xrtn.dmpp.net.cn/xrtn-manager/images/demo/demo_tongue.jpg" alt="">
                            </div>
                        </div>
                    </div>
                    <div class="couponOption" style="position:relative;z-index:10;height: 7rem;">
                        <label class="fast_formTipWidth heavy-weight">*正面全脸</label>
                        <label class="newCouponWidth light-weight">(拍照请参考右侧示例照片)</label>
                        <form name="imgForm" id="jsImg_2" method="post" enctype="multipart/form-data">
                            <div class="Js_preview previewImd_upLoad" style="left: 6rem;">
                                <img class="imghead" border="0" src="/xrtn-manager/images/newImg.png" width="70" height="60" onclick="changeEditImg(this)"; />
                                <input type="file" name="img" onchange="zcuploadImage(this)" style="display: none;" id="Js_previewImgNew_2" />
                            </div>
                            <input type="hidden" value="" class="Js_previewImgNew_2" />
                        </form>
                        <div class="previewImd_demoImg">
                            <div class="">
                                <img class="img_demo" src="http://admin.xrtn.dmpp.net.cn/xrtn-manager/images/demo/demo_face.jpg" alt="">
                            </div>
                        </div>
                    </div>
                    <div class="couponOption" style="position:relative;height: 7rem;">
                        <label class="fast_formTipWidth heavy-weight">*掌心正面</label>
                        <label class="newCouponWidth light-weight">(拍照请参考右侧示例照片)</label>
                        <form name="imgForm" id="jsImg_3" method="post" enctype="multipart/form-data">
                            <div class="Js_preview previewImd_upLoad" style="left: 6rem;">
                                <img class="imghead" border="0" src="/xrtn-manager/images/newImg.png" width="70" height="60" onclick="changeEditImg(this)"; />
                                <input type="file" name="img" onchange="zcuploadImage(this)" style="display: none;" id="Js_previewImgNew_3" />
                            </div>
                            <input type="hidden" value="" class="Js_previewImgNew_3" />
                        </form>
                        <div class="previewImd_demoImg">
                            <div class="">
                                <img class="img_demo" src="http://admin.xrtn.dmpp.net.cn/xrtn-manager/images/demo/demo_hand.jpg" alt="">
                            </div>
                        </div>
                    </div>
                    <div class="form_group">
                        <label class="fast_form_group heavy-weight" style="vertical-align: top">诊断备注</label>
                        <label class="newCouponWidth light-weight">(其他症状、建议性的诊断结论在此添加)</label>
                    </div>
                    <div class="couponOption form_group" id="bandleBoxBefore">
                        <label class="fast_form_group heavy-weight" style="vertical-align: top"></label>
                        <input class="newCouponWidth newIllInput_border form_control" name="treatmentOpinion" placeholder="请输入诊断备注" height="2.5rem">
                    </div>
                    <button class="saveBtnBox" id="ill_saveBtnBox" type="button">提交</button>
                </div>
            </div>
            <%--推拿--%>
            <div class="Baby_Healthy_home_billing_right_center hidden">
                <p class="Baby_Healthy_home_billing_right_center_tit">推拿信息</p>
                <div class="float_r zcsearch" style="margin-top: -3.75rem">
                    <input id="serviceNameSearchIpunt" class="zcsearch_input" type="text" style="height:2.5rem" placeholder="请输入服务名称" />
                    <button class="zcsearch_btn" style="height:2.3rem" id="serviceSearchBtn">搜索</button>
                </div>
                <div class="storeelmwrap row zcwrap" id="tuinaList">
                    <div class="col-sm-3 pd_hor5 js_storeelm">
                    </div>
                </div>
            </div>
            <%--商品 --%>
            <div class="Baby_Healthy_home_billing_right_center hidden">
                <p class="Baby_Healthy_home_billing_right_center_tit">商品信息</p>
                <div class="float_r zcsearch" style="margin-top: -3.75rem">
                    <input id="goodsNameSearchIpunt" class="zcsearch_input" type="text" style="height:2.5rem" placeholder="请输入商品名称" />
                    <button class="zcsearch_btn" style="height:2.3rem" id="goodsSearchBtn">搜索</button>
                </div>
                <div class="storeelmwrap row zcwrap" id="productList">
                </div>
            </div>
            <%--右側--%>
            <div class="Baby_Healthy_home_billing_right_right" id="rightDiv">
                <div class="serachSelect">
                    <select id="searchbox" class="billing_right_right_btn_searchbox" style="width: 80%;">
                        <option value=""></option>
                    </select>
                </div>
                <div class="noticeImg newNotic"></div>
                <%--消费详情--%>
                <div class="consumeListContains hidden" style="height: 100%"></div>
            </div>
            <!-- 收款弹窗 -->
            <div class="gatheringlist zcwrap hidden">
                <div class="zccard js_paywrap_service">
                    <h5 class="tit">选择服务支付方式</h5>
                    <div class="zccardelm paystyle" rel="1">
                        <div class="row" style="margin-bottom:1rem;">
                            <div class="col-lg-4 col-md-4 col-sm-6 pd_hor5">
                                <div class="payelm active" rel="0">
                                    <i class="icon ye"></i>
                                    <span>会员余额</span>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-4 col-sm-6 pd_hor5">
                                <div class="payelm" rel="2">
                                    <i class="icon wechat"></i>
                                    <span>微信</span>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-4 col-sm-6 pd_hor5">
                                <div class="payelm" rel="1">
                                    <i class="icon alpay"></i>
                                    <span>支付宝</span>
                                </div>
                            </div>
                        </div>
                        <div class="row" style="margin-bottom:2rem;">
                            <div class="col-lg-4 col-md-4 col-sm-6 pd_hor5">
                                <div class="payelm" rel="4">
                                    <i class="icon ca"></i>
                                    <span>Pos机</span>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-4 col-sm-6 pd_hor5">
                                <div class="payelm" rel="3">
                                    <i class="icon money"></i>
                                    <span>现金</span>
                                </div>
                            </div>
                            <%--<div class="col-lg-4 col-md-4 col-sm-6 pd_hor5">--%>
                            <%--<div class="payelm" rel="5">--%>
                            <%--<i class="icon ca"></i>--%>
                            <%--<span>卡券支付</span>--%>
                            <%--</div>--%>
                            <%--</div>--%>
                        </div>
                    </div>
                </div>
                <div class="zccard js_paywrap_goods">
                    <h5 class="tit">选择商品支付方式</h5>
                    <div class="zccardelm paystyle" rel="2">
                        <div class="row" style="margin-bottom:1rem;">
                            <div class="col-lg-4 col-md-4 col-sm-6 pd_hor5">
                                <div class="payelm active" rel="0">
                                    <i class="icon ye"></i>
                                    <span>会员余额</span>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-4 col-sm-6 pd_hor5">
                                <div class="payelm" rel="2">
                                    <i class="icon wechat"></i>
                                    <span>微信</span>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-4 col-sm-6 pd_hor5">
                                <div class="payelm" rel="1">
                                    <i class="icon alpay"></i>
                                    <span>支付宝</span>
                                </div>
                            </div>
                        </div>
                        <div class="row" style="margin-bottom:2rem;">
                            <div class="col-lg-4 col-md-4 col-sm-6 pd_hor5">
                                <div class="payelm" rel="4">
                                    <i class="icon ca"></i>
                                    <span>Pos机</span>
                                </div>
                            </div>
                            <div class="col-lg-4 col-md-4 col-sm-6 pd_hor5">
                                <div class="payelm" rel="3">
                                    <i class="icon money"></i>
                                    <span>现金</span>
                                </div>
                            </div>
                            <%--<div class="col-lg-4 col-md-4 col-sm-6 pd_hor5">--%>
                            <%--<div class="payelm" rel="5">--%>
                            <%--<i class="icon ca"></i>--%>
                            <%--<span>卡券支付</span>--%>
                            <%--</div>--%>
                            <%--</div>--%>
                        </div>
                    </div>
                </div>
                <div class="zccard">
                    <h5 class="tit">消费明细</h5>
                    <div class="zccardelm detaillist">
                        <div class="row serviceelm">
                            <div class="col-sm-6">
                                小儿推拿(次卡)
                            </div>
                            <div class="col-sm-4">
                                <p class="font_right">x<span class="num">1</span></p>
                            </div>
                            <div class="col-sm-2 font_right">
                                <p class="money font_right">￥<span>499</span></p>
                                <p class="hidden font_right">-<span>499</span></p>
                            </div>
                        </div>
                        <div class="row couponwrap hidden">
                            <div class="col-sm-6">
                                <p class="js_couponName" style="color:#000">满减券</p>
                            </div>
                            <div class="col-sm-6 font_right">
                                <p>-<span class="couponMoney">0</span></p>
                            </div>
                        </div>
                        <div class="row littlesumwrap">
                            <div class="col-sm-6">

                            </div>
                            <div class="col-sm-6 font_right">
                                <p class="littlesum">小计：<span data-cost="499">￥499</span></p>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="zccard" style="margin-bottom:1.0rem">
                    <div class="zccardelm">
                        <div class="row">
                            <div class="col-sm-12 font_right">
                                <p class="countsum" data-cost="0">应收金额：&nbsp;&nbsp;&nbsp;&nbsp;<span>￥ 0</span></p>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="zccard">
                    <h5 class="tit">订单信息</h5>
                    <div class="zccardelm" style="padding: 0 10px;">
                        <div class="row">
                            <div class="col-sm-4">
                                订单号：
                            </div>
                            <div class="col-sm-8 font_right">
                                <p class="js_orderNo">M2018011823339031872577</p>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-4">
                                下单时间：
                            </div>
                            <div class="col-sm-8 font_right">
                                <p class="js_createTimetr">2018-01-18  20:33:39</p>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-4">
                                会员姓名：
                            </div>
                            <div class="col-sm-8 font_right">
                                <p class="js_userName">--</p>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-4">
                                会员电话：
                            </div>
                            <div class="col-sm-8 font_right">
                                <p class="js_userPhone">138****0000</p>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-4">
                                会员余额：
                            </div>
                            <div class="col-sm-8 font_right">
                                <p class="js_userAccount font_red">￥ 0</p>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-4">
                                到期时间：
                            </div>
                            <div class="col-sm-8 font_right">
                                <p class="js_outTime font_red"></p>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-4">
                                收银员：
                            </div>
                            <div class="col-sm-8 font_right">
                                <p class="js_cashierName">--</p>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="zccard js_paywrap_other hidden">
                    <h5 class="tit">他人代付</h5>
                    <div class="zccardelm js_paywrap_other_new">
                        <div class="row" style="margin-bottom: 10px">
                            <div class="col-sm-4">
                                <label class="form-control-static">代付人手机号：</label>
                            </div>
                            <div class="col-sm-8 font_right row" style="padding-right: 0">
                                <div class="col-sm-12" style="padding-right: 0">
                                    <input type="text" class="form-control js_payOrderPhone">
                                </div>
                            </div>
                        </div>
                        <%--<div class="row">--%>
                            <%--<div class="col-sm-4">--%>
                                <%--<label class="form-control-static"> 验证码：</label>--%>
                            <%--</div>--%>
                            <%--<div class="col-sm-8 font_right row" style="padding-right: 0">--%>
                                <%--<div class="col-sm-8" style="padding-right: 0">--%>
                                    <%--<input type="text" class="form-control js_checkId" style="padding-right: 0" />--%>
                                <%--</div>--%>
                                <%--<div class="col-sm-4" style="padding-right: 0">--%>
                                    <%--<button class="btn btn-sm btn-info js_getCheckBtn" style="width: 100%;">获取验证码</button>--%>
                                <%--</div>--%>
                            <%--</div>--%>
                        <%--</div>--%>
                        <!-- <div class="row">
                            <div class="col-sm-4">
                                &nbsp;
                            </div>
                            <div class="col-sm-8 font_right">
                                <a class="btn btn-sm btn-info js_checkBtn" style="width: 100%;color: #fff;">确定</a>
                            </div>
                        </div> -->
                    </div>
                    <!-- <div class="zccardelm js_paywrap_other_old">
                        <div class="row">
                            <div class="col-sm-4">
                                代付人姓名：
                            </div>
                            <div class="col-sm-8 font_right">
                                <p class="js_payOrderName"></p>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-4">
                               代付人手机号：
                            </div>
                            <div class="col-sm-8 font_right">
                                <p class="js_payOrderPhone"></p>
                            </div>
                        </div>
                    </div> -->
                </div>
            </div>
            <!-- 病历弹窗 -->
            <div class="caselistwrap zcwrap dialogelm hidden">
                <table class="zctable-sm table table-striped table-no-bordered table-hover js_caselist">
                    <thead>
                        <th>发病日期</th>
                        <th>接诊推拿师</th>
                        <th>主诉</th>
                        <th>病历详情</th>
                    </thead>
                </table>
            </div>
        </div>
    </div>
</div>

</body>
<script src="${pageContext.request.contextPath}/js/home_billing.js"></script>
<script>
    // $('.js_patientinfo') 预约类型dom A
    // $('.js_saveBooking_wrap') 预约类型按钮dom A
    // $('.illHistory') 基本信息就诊记录dom A

    initBase()

    function initBase(){
        // bodyPointListHandle();   // 获取穴位
        // getMainList();  // 获取主症
        treatmentIdBaseData() //主症 兼症 配穴
        productListHandle();//获取商品列表
    }

    if(DocData.orderId != ''){
        DocData.canPay = true
    }

    // 获取预约信息
    if(baseFn.notNull(DocData.bookingInfo.bookingId)){
        baseFn.$get({
            url:baseUrl.booking+'selectBookingInfo',
            data:{
                bookingId:DocData.bookingInfo.bookingId
            },
            calFn:function(res){
                $('.Baby_Healthy_home_billing_left_dd').attr('flage',true);
                DocData.bookingInfo=$.extend({},DocData.bookingInfo,res)
                if(baseFn.notNull(DocData.bookingInfo.userId)){
                    getUserMsgHandle(DocData.bookingInfo.userId);
                }else{
                    baseFn.infoDialog('该用户不存在')
                }
            }
        })
    }
    
    // 1.获取用户信息(new)
    function getUserMsgHandle(userId){
        tuinaList()//加载推拿服务(获取用户是否办卡，以及剩余卡次 cardNumber)
        baseFn.$get({
            url:baseUrl.user+'selectUserInfo',
            data:{userId:userId},
            calFn:function(res){
                $('.Baby_Healthy_home_billing_left_dd').attr('flage',true);//左侧导航可以使用
                var _userInfo=res.userInfo,_patientList=res.patientList;
                DocData.patientGroup = _patientList//宝宝列表
                $('#searchbox').val(null).trigger('change');//搜索宝宝框清空
                $('.newNotic>p').hide();//隐藏无数据提示
                DocData.userInfo = _userInfo;
                DocData.userCardList = res.cardList;
                DocData.canRenderOrderList()
                if(!baseFn.notNull(_userInfo.userImg)){
                    _userInfo.userImg = baseUrl.tempHeadImg
                }
                var msgHtml = baseHtml.home_billing_rightInfo({
                                userImg:_userInfo.userImg,
                                userName:_userInfo.userName,
                                userPhone:baseFn.getHidePhoneStr(_userInfo.userPhone)
                            })
                $('.consumeListContains').html(msgHtml);
                if(baseFn.notNull(DocData.userInfo.userId)){
                    $('.otherpay_wrap_btn').removeClass('hidden')
                }else{
                    $('.otherpay_wrap_btn').addClass('hidden')
                }//代付按钮
                $('.serachSelect').addClass('hidden').siblings('.consumeListContains').removeClass('hidden').siblings('.noticeImg').addClass('hidden');
                getChildrenListHandle(DocData.bookingInfo.userId);
                //保存预约按钮事件绑定
                $('.js_saveBooking').off('click').on('click',function(){
                    DocData.bookingInfo.bookingDesc = $(this).val()
                    if(baseFn.notNull(DocData.patientInfo.patientId)){
                        DocData.upBookingInfo()
                    }else{
                        baseFn.infoDialog('请选择或新增一名宝宝！')
                    }
                })
                //预约类型按钮事件绑定
                $('.js_tipsbtn').off('click').on('click',function(){
                    if(baseFn.notNull(DocData.userId)){
                        return false
                    }
                    if($(this).hasClass('disabled')){
                        return false
                    }
                    $(this).addClass('active')
                    if($(this).attr('rel') == 1){
                        if(DocData.bookingInfo.bookingType == 0){
                            return false
                        }
                        $('.js_tips2_wrap').removeClass('hidden')
                        // if(baseFn.notNull(DocData.bookingInfo.patientId)){
                        //     $('.js_tips2_wrap').removeClass('hidden')
                        // }
                        
                        $('.js_tipsbtn[rel=2]').removeClass('active')
                        $('.js_tipsbtn[rel=4]').addClass('active')
                        DocData.bookingInfo.bookingType = 0
                        DocData.bookingInfo.isAdd = 1
                        treatmentTest(DocData.bookingInfo.bookingType)
                        var _rel = $('.Baby_Healthy_home_billing_left_dd.bgc_alert').attr('rel')
                        if(_rel==3 || _rel==4 ){
                            $('.Baby_Healthy_home_billing_left_dd[rel=2]').trigger('click')
                        }
                    }else if($(this).attr('rel') == 2){
                        if(DocData.bookingInfo.bookingType == 1){
                            return false
                        }
                        $('.js_tips2_wrap').addClass('hidden')
                        $('.js_tipsbtn[rel=1]').removeClass('active')
                        DocData.bookingInfo.bookingType = 1
                        DocData.bookingInfo.isAdd = 1
                        treatmentTest(DocData.bookingInfo.bookingType)
                        $('.js_tipsbtn[rel=4]').addClass('active')
                        $('.js_tipsbtn[rel=3]').removeClass('active')
                    }else if($(this).attr('rel') == 3){
                        if(DocData.bookingInfo.isAdd == 0){
                            return false
                        }
                        $('.js_tipsbtn[rel=4]').removeClass('active')
                        DocData.bookingInfo.isAdd = 0
                    }else if($(this).attr('rel') == 4){
                        if(DocData.bookingInfo.isAdd == 1){
                            return false
                        }
                        $('.js_tipsbtn[rel=3]').removeClass('active')
                        DocData.bookingInfo.isAdd = 1
                    }
                    // console.log(DocData.bookingInfo)
                    DocData.bookingInfo.bookingDesc = $('textarea.js_bookingDesc').val()
                    if(DocData.bookingInfo.canSave){
                        DocData.upBookingInfo()
                    }
                })
                //预约备注事件绑定
                if(baseFn.notNull(DocData.orderId)){
                    $('textarea.js_bookingDesc').prop('disabled',true)
                    $('#addIllPeople').addClass('hidden')
                }else{
                    $('textarea.js_bookingDesc').on('blur',function(){
                        DocData.bookingInfo.bookingDesc = $(this).val()
                        if(DocData.bookingInfo.canSave){
                            DocData.upBookingInfo()
                        }
                    
                    })
                }
                
            },
            comFn:function(){
                //渲染门店
                getStoreList()
                if(DocData.orderId != ''){
                    $('.gatheringBtn').trigger('click')
                }
            }
        })
    }

    // 2.获取宝宝列表
    function getChildrenListHandle(userId){
        if(baseFn.notNull(DocData.userInfo.userId)){
            baseFn.$get({
                url:"patient/selectPatientInfoList",
                data:{userId: DocData.userInfo.userId},
                calFn:function(data){
                    $('.patientList>.eachItem').remove();
                    
                    var dataMsg = data,_showDetailId=0;
                    //预约类型选择 的显示和隐藏
                    if(dataMsg.length > 0){
                        DocData.patientGroup = dataMsg
                        $('.js_patientinfo').removeClass('hidden') //预约类型dom
                        for(var i = 0;i<dataMsg.length;i++){
                            if(baseFn.notNull(DocData.bookingInfo.patientId) &&　dataMsg[i].patientId == DocData.bookingInfo.patientId){
                                _showDetailId = i
                            }
                            patientId = dataMsg[i].patientId;
                            var patientName = dataMsg[i].patientName;
                            var patientGender = (dataMsg[i].patientGender=='1'?"女":"男");
                            var patientAge = dataMsg[i].patientAge;
                            var babyHtml = '<div class="clearfix eachItem" rel="'+patientId+'" data-ids="'+ i +'">\
                                                <div class="fl newfl" style="width: 100%;">\
                                    <span class="patientDesc">宝宝'+(i+1)+'</span>\
                                    <span class="patientDesc babyNameWidth">'+patientName+'</span>\
                                    <span class="patientDesc">'+patientGender+'</span>\
                                    <span class="patientDesc">'+patientAge+'岁</span>\
                                </div>\
                            </div>';
                            $('.patientList').append(babyHtml);
                        }    
                        DocData.patientInfo=dataMsg[_showDetailId]
                        $('.patientList>.eachItem').eq(_showDetailId).trigger("click");
                    }else{
                        $('.js_patientinfo').addClass('hidden') //预约类型dom
                        DocData.patientGroup=[]
                    }
                }
            })
        }else{}            
    }

    // 4.获取宝宝病历详情
    function getBabyListIllHandle(tempTreatId,edit) {
        var _tempTreatId=DocData.bookingInfo.treatmentId,_cancelEdit = true
        if(tempTreatId){
            _tempTreatId = tempTreatId;
        }
        if(edit){
            _cancelEdit=!edit
        }
        baseFn.$get({
            url:baseUrl.patient + "selectSysTreatmentInfo",
            data:{
                treatmentId:_tempTreatId
            },
            oCalFn:function(res){
                baseFn.$get({
                    url:baseUrl.special + "selectSpecialList",
                    data:{},
                    oCalFn:function(res){

                    },
                    calFn:function(res){
                        renderSpecialInfo(res);
                        renderTreatment()
                    }
                })
            },
            calFn:function(res){
                var _data = res.patientTreatment
                _data.pointList = res.pointList
                _data.pointRelList = res.pointRelList
                _data.diseaseRelList = res.diseaseRelList
                _data.conclusionList = res.conclusionList
                _data.treatmentSpecialMap = res.treatmentSpecialMap
                if(baseFn.notNull(_data.diseaseTime)){
                    _data.diseaseTime = baseFn.timestampToTime(_data.diseaseTime).substring(0,11)
                }else{
                    _data.diseaseTime = ''
                }
                _data.nearlyTime = true
                DocData.realResult = _data.treatmentSpecialMap.specialRealScore ? _data.treatmentSpecialMap.specialRealScore : 0;
                DocData.error = _data.treatmentSpecialMap.specialError ? _data.treatmentSpecialMap.specialError : 0;

                baseFn.$get({
                    url:baseUrl.special + "selectSpecialList",
                    data:{},
                    oCalFn:function(res){

                    },
                    calFn:function(res){
                        renderSpecialInfo(res);
                        renderTreatment(_data,_cancelEdit);
                    }
                })
            }
        })
    }

    //病历编辑开关
    function eidtingCase(edit){
        var pDom=$('.fast_caseOfIll')
        if(edit){
            pDom.find('.edit_btn').addClass('hidden')
            pDom.find('textarea').removeClass('borderNone').prop("readonly",false);
            pDom.find('input.form_control').removeClass('borderNone').prop("readonly",false);
            pDom.find('input[type=file]').removeClass('borderNone').prop("disabled",false);
            pDom.find('select').removeClass('borderNone').attr("disabled",false);
            pDom.find('select').addClass('select_arrow').attr("disabled",false);
            pDom.find('.addBorderLine').removeClass('hidden');
            pDom.find('.saveBtnBox').removeClass('hidden').attr('rel','on');
            bindSpecialClick();
        }else{
            pDom.find('.edit_btn').removeClass('hidden')
            pDom.find('textarea').addClass('borderNone').prop("readonly",true);
            pDom.find('input.form_control').addClass('borderNone').prop("readonly",true);
            pDom.find('input[type=file]').removeClass('borderNone').prop("disabled",true);
            pDom.find('select').addClass('borderNone').attr("disabled",true);
            pDom.find('select').removeClass('select_arrow').attr("disabled",true);
            pDom.find('.addBorderLine').addClass('hidden');
            pDom.find('.saveBtnBox').addClass('hidden').attr('rel','off');
            unBindSpecialClick();
        }
    }
    //渲染病历
    function renderTreatment(data,cancelEdit){
        var _opts = $.extend({},{
            conclusionList:[],
            diseaseRelList:[],
            patientTreatment:{
                diseaseTime:''
            },
            pointList:[],
            pointRelList:[],
            treatmentSpecialMap:{
                infoIds:[],
                specialCheckScore:0,
                specialError:0,
                specialRealScore:0
            },
            treatmentId:'',
            diseaseTime:'',
            diseaseInfo:'无',
            treatmentRemarks:'无',
            treatmentImg:'',
            faceImg:'',
            handsImg:'',
            nearlyTime:false,//是否显示查看上次就诊病历按钮,
            img:'/xrtn-manager/images/newImg.png'//默认img
        },data || {})
        //发病日期初始化
        $('input[name=diseaseTime]').val(_opts.diseaseTime);
        //主诉初始化
        $('input[name=diseaseInfo]').val(_opts.diseaseInfo);
        //自主配穴初始化
        $('input[name=treatmentRemarks]').val(_opts.treatmentRemarks);
        //诊断备注初始化
        $('input[name=treatmentOpinion]').val(_opts.treatmentOpinion);
        //主症/兼症
        //主症描述初始化
        $('.mainBox').remove();
        for(var w=0;w<_opts.diseaseRelList.length;w++){
            var _cur = _opts.diseaseRelList[w]
            if(_cur.isMain == 1){
                //主症
                var _label=''
                if($('.mainBox').length == 0){
                    _label='*主症描述'
                }
                var mainHtml = $('<div class="couponOption mainBox">\
                        <label class="fast_formTipWidth heavy-weight">'+_label+'</label>\
                        <select class="couponInput newWidthTip select_arrow mainList" type="text"></select>\
                        <select class="couponInput newWidthTip select_arrow bandList" type="text"></select>\
                        </div>');
                $('#addMainList').before(mainHtml)
                for(var i=0;i<DocData.newMainList.length;i++){
                    var _optionTxt = '<option value="'+DocData.newMainList[i].typeId+'">'+DocData.newMainList[i].typeName+'</option>'; 
                    mainHtml.find('.mainList').append(_optionTxt)
                }
                var _child0Arr = DocData.newMainList.filter(function(val){
                    return _cur.typeId == val.typeId
                })
                var _child0 = _child0Arr.length==0?[]:_child0Arr[0].childList
                for(var j=0;j<_child0.length;j++){
                    var _optionTxt = '<option rel="'+_child0[j].diseaseScore+'" value="'+_child0[j].descId+'">'+_child0[j].descName+'</option>'; 
                    mainHtml.find('.bandList').append(_optionTxt)
                }
                mainHtml.find('.mainList option[value='+_cur.typeId+']').attr('selected',true)
                mainHtml.find('.bandList option[value='+_cur.diseaseId+']').attr('selected',true)
            }else{
                //兼症
                $('.fast_caseOfIll_select').find('.fast_caseOfIll_select_box').each(function(x,y){
                    var _val = $(y).find('.js_disease_label').attr('value')
                    if(_val == _cur.typeId){
                        $(y).find('select.couponInput').val(_cur.diseaseId)
                    }
                })
            }
        }
        if($('.mainBox').length == 0){
            var mainHtml = $('\
                        <div class="couponOption mainBox">\
                        <label class="fast_form_group control-label heavy-weight" style="width: 12%;">*主症描述</label>\
                        <label class="newCouponWidth light-weight">(必须与主诉符合，否则视为无效单)</label>\
                        </div>\
                        <div class="couponOption mainBox">\
                        <label class="fast_formTipWidth heavy-weight"></label>\
                        <select class="couponInput newWidthTip select_arrow mainList" type="text"></select>\
                        <select class="couponInput newWidthTip select_arrow bandList" type="text"></select>\
                        </div>');
            $('#addMainList').before(mainHtml)
            for(var i=0;i<DocData.newMainList.length;i++){
                var _optionTxt = '<option value="'+DocData.newMainList[i].typeId+'">'+DocData.newMainList[i].typeName+'</option>'; 
                mainHtml.find('.mainList').append(_optionTxt)
            }
            if (DocData.newMainList.length > 0) {
                var _child0 = DocData.newMainList[0].childList
                for(var j=0;j<_child0.length;j++){
                    var _optionTxt = '<option rel="'+_child0[j].diseaseScore+'" value="'+_child0[j].descId+'">'+_child0[j].descName+'</option>';
                    mainHtml.find('.bandList').append(_optionTxt)
                }
            }
        }else{
            filterSelectList()
        }
        if($('.mainBox').length < DocData.newMainList.length){
            $('#addMainList').removeClass('hidden')//主症添加按钮
        }else{
            $('#addMainList').addClass('hidden')//主症添加按钮
        }
        //主症选择

        // treatmentSpecialMap 处理特病
        var infoIds = _opts.treatmentSpecialMap.infoIds;
        DocData.checkResult = 0;
        for (var i = 0; i < infoIds.length; i++) {
            var info = infoIds[i];
            var specialDom = $('input[type=checkbox][watch=special][value='+info+']');
            specialDom.addClass("checkBox_checked");
            DocData.checkResult += parseInt(specialDom.attr("score"));
        }
        if (infoIds.length > 0) {
            $(".specialBox").show();
            $("#specialCheck").addClass('checkBox_checked');
            $(".specialScoreBox").show();
            $("#checkResultLabel").html(Math.round(DocData.checkResult/DocData.totalSpecialScore*100) + "%");
            $("#realScore").val(DocData.realResult);
            $("#scoreLabel").html(DocData.error + "%");
        }
        
        //pointList 配穴
        var _tempPoints=[]
        $('.fast_caseOfIll_pointgroup').find('.bandleBox').each(function(j,n){
            var _val = $(n).find('.bandle_label').attr('value');
            var _temps = _opts.pointList.filter(function(val){
                return val.typeId == _val
            })
            var _tempPointIds=[]
            for(var k=0;k<_temps.length;k++){
                _tempPointIds.push(_temps[k].pointId)
            }
            $(n).find('.bodyPointList').val(_tempPointIds).trigger('change')  
        })
        //图片 treatmentImg
        var _img1=_opts.img,_img1val=""
        if(baseFn.notNull(_opts.treatmentImg)){
            _img1 =_img1val= _opts.treatmentImg
        }
        $('#jsImg_1').find('.imghead').attr('src',_img1)
        $('#jsImg_1').find('input[type=hidden]').val(_img1val)
        //图片 faceImg
        var _img2=_opts.img,_img2val=""
        if(baseFn.notNull(_opts.faceImg)){
            _img2 =_img2val= _opts.faceImg
        }
        $('#jsImg_2').find('.imghead').attr('src',_img2)
        $('#jsImg_2').find('input[type=hidden]').val(_img2val)
        //图片 handsImg
        var _img3=_opts.img,_img3val=""
        if(baseFn.notNull(_opts.handsImg)){
            _img3 =_img3val= _opts.handsImg
        }
        $('#jsImg_3').find('.imghead').attr('src',_img3)
        $('#jsImg_3').find('input[type=hidden]').val(_img3val)
        //诊断结论初始化
        var _selectConclusions=[]
        for(var i=0;i<_opts.conclusionList.length;i++){
            _selectConclusions.push(_opts.conclusionList[i].conclusionId)
        }
        $('#selectConclusion').val(_selectConclusions).trigger('change')
        eidtingCase(!cancelEdit)
    }

    //发病日期时间初始化
    baseFn.dateTimePick('#illData')

    /*病历图片*/
    //编辑图片上传
    function changeEditImg(e){
        var _this = $(e)
        _this.siblings('input[type=file]').click();
    }

    function zcuploadImage(e){
        baseFn.imgUpload($(e).parents('form').attr('id'),function(res){
            $(e).siblings('.imghead').attr('src',res.url);
            $(e).parents('.Js_preview').siblings('input[type=hidden]').val(res.url)
        })
    }
    /*病历图片*/
    //病历基础数据获取（配穴,主症兼症）
    function treatmentIdBaseData(){
        baseFn.$get({
            url:baseUrl.init+'selectSysList',
            calFn:function(res){
                var _diseaseList = res.diseaseList,_pointList=res.pointList;
                for(var i=0;i<_diseaseList.length;i++){
                    if(_diseaseList[i].isMain == 1){
                        DocData.newMainList.push(_diseaseList[i])
                    }else{
                        DocData.newDiseaseList.push(_diseaseList[i])
                    }
                }
                for (var i = 0; i < _diseaseList.length; i++) {
                    var typeName = _diseaseList[i].typeName;
                    var typeId = _diseaseList[i].typeId;
                    var isMain = _diseaseList[i].isMain;
                    var diseaseScore = _diseaseList[i].diseaseScore;
                    if(isMain=='1'){
                        var optionHtml = '<option value="' + typeId + '" rel="'+diseaseScore+'">' + typeName + '</option>';
                        $('.mainList').append(optionHtml);
                        // DocData.newMainList.push(_diseaseList[i])
                    }else{
                        var childList = _diseaseList[i].childList;
                        var boxHtml = '<div class="fast_caseOfIll_select_box">\
                                    <label class="fast_caseOfIll_select_tipwidth js_disease_label" value="'+typeId+'">'+typeName+'</label>\
                                    <input type="hidden" name="diseaseScore" value="'+diseaseScore+'">\
                                    <input type="hidden" name="isMain" value="'+isMain+'">\
                                <select class="couponInput fast_caseOfIll_wid select_arrow" type="text" value="'+typeId+'"></select>\
                                </div>';
                        $('.fast_caseOfIll_select').append(boxHtml);
                        getJianzgengHandle(childList,typeId);
                        DocData.newDiseaseList.push(_diseaseList[i])
                    }
                    
                }
                var _child0=DocData.newMainList[0].childList
                for(var j=0;j<_child0.length;j++){
                    var _opts2 = '<option value="' + _child0[j].descId + '">' + _child0[j].descName + '</option>';
                    $('.bandList').append(_opts2) 
                }
                //配穴
                for (var i = 0; i < _pointList.length; i++) {
                    DocData.point.push(_pointList[i])
                    var typeName = _pointList[i].typeName;
                    if(_pointList[i].childList[0] && _pointList[i].childList[0].typeId != ''){
                        var bodyPointHtml = $('<div class="couponOption bandleBox">\
                            <label class="bandle_label" value="'+_pointList[i].childList[0].typeId+'">'+typeName+'</label>\
                            <select class="couponInput newWidthTip fast_caseOfIll_wid select_arrow bodyPointList js_bodyPointList'+i+'" type="text" placeholder="请选择症状程度" style="width:50%">\
                            </select></div>')
                        $('.fast_caseOfIll_pointgroup').append(bodyPointHtml)
                        baseFn.rpSelect('.js_bodyPointList'+i,{
                            datas:_pointList[i].childList,
                            multiple:true,
                            placeholder:'请选择配穴',
                            idKey:"pointId",
                            textKey:'pointName'
                        })
                    }
                }
            }
        })
    }
    //兼症症状
    function getJianzgengHandle(childList,typeId){
        $('.fast_caseOfIll_select_box>.select_arrow').each(function(i,n){
            if($(n).attr('value')==typeId){
                for(var i =0;i<childList.length;i++){
                    var descId =childList[i].descId;
                    var descName =childList[i].descName;
                    var diseaseScore =childList[i].diseaseScore;
                    var optionHtml = '<option value="'+descId+'" rel="'+diseaseScore+'">'+descName+'</option>';
                    $(n).append(optionHtml);
                }

            }
        })
    }
    //主症选择过滤
    function filterSelectList(opts){
        //过滤---主症
        var _opts=$.extend({},{
            baseData:DocData.newMainList,
            parentDomName:'.fast_caseOfIll',
            domName:'.mainList',
            id:'typeId',
            text:''
        },opts || {})
        var _temp=[];
        $(_opts.parentDomName).find('select'+_opts.domName).each(function(j,m){
            _temp.push($(m).val())
        })
        $(_opts.parentDomName).find('select'+_opts.domName).each(function(i,n){
            for(var x=0;x<_opts.baseData.length;x++){
                var _val = _opts.baseData[x][_opts.id]
                var _show=_temp.every(function(val){
                    return val != _val 
                }) || _val == $(n).val()
                if(_show){
                    $(n).find('option[value="'+_val+'"]').removeClass('hidden')
                }else{
                    $(n).find('option[value="'+_val+'"]').addClass('hidden')
                }
            }
        })

    }

    function treatmentTest(bookingType){
        var _bookingType=baseFn.notNull2(bookingType,true,1)
        if(_bookingType == 0){
            if(baseFn.notNull(DocData.bookingInfo.treatmentId)){
                baseFn.$get({
                    url:baseUrl.patient + "selectSysTreatmentInfo",
                    data:{
                        treatmentId:DocData.bookingInfo.treatmentId
                    },
                    oCalFn:function(res){},
                    calFn:function(res){
                        if(!baseFn.notNull(res.conclusionList) || res.conclusionList.length == 0){
                            DocData.bookingInfo.treatmentOk = false;
                            return false
                        }else if(!baseFn.notNull(res.pointList) || res.pointList.length == 0){
                            DocData.bookingInfo.treatmentOk = false;
                            return false
                        }else if(!baseFn.notNull(res.pointRelList) || res.pointRelList.length == 0){
                            DocData.bookingInfo.treatmentOk = false;
                            return false
                        }else if(!baseFn.notNull(res.diseaseRelList) || res.diseaseRelList.length <= 1){
                            DocData.bookingInfo.treatmentOk = false;
                            return false
                        }else if(!baseFn.notNull(res.diseaseRelList) || res.diseaseRelList.length > 1){
                            var _mainlen=0,_otherlen=0
                            for(var i=0;i<res.diseaseRelList.length;i++){
                                if(res.diseaseRelList[i].isMain == 1){
                                    _mainlen += 1
                                }else{
                                    _otherlen += 1
                                } 
                            }
                            if(_mainlen == 0 || _otherlen == 0){
                                DocData.bookingInfo.treatmentOk = false;
                                return false
                            }
                        }
                        if(!baseFn.notNull(res.patientTreatment)){
                            DocData.bookingInfo.treatmentOk = false;
                            return false
                        }else{
                            var _data=res.patientTreatment;
                            if(!baseFn.notNull(_data.diseaseInfo) || !baseFn.notNull(_data.faceImg) || !baseFn.notNull(_data.handsImg) || !baseFn.notNull(_data.treatmentImg) || !baseFn.notNull(_data.createTime)){
                                DocData.bookingInfo.treatmentOk = false;
                                return false
                            }
                        }
                        DocData.bookingInfo.treatmentOk = true;
                    }
                })
            }else{
                DocData.bookingInfo.treatmentOk = false;
            }
            
        }else if(_bookingType == 1){
            DocData.bookingInfo.treatmentOk = true;
        }
    }

    //商品列表
    function productListHandle(goodsName) {
        baseFn.$get({
            url:baseUrl.init+"selectInitGoodsList",
            data:{state:1, goodsName:goodsName},
            calFn:function(dataMsg){
                $('#productList').empty();
                for(var i=0;i<dataMsg.length;i++){
                    DocData.goodsList.push(dataMsg[i])
                    var goodsImg = dataMsg[i].goodsImg;
                    var goodsName = dataMsg[i].goodsName;
                    var goodsId = dataMsg[i].goodsId;
                    var goodsCost = dataMsg[i].goodsCost;
                    var goodHtml='<div class="col-sm-3 pd_hor5 js_storeelm">\
                                        <div class="row storecnt">\
                                            <div class="col-sm-10 pd_hor5">\
                                                <p class="tit">'+goodsName+'</p>\
                                                <p class="tips">￥<span>'+goodsCost+'</span></p>\
                                            </div>\
                                            <div class="col-sm-2 pd_hor5">\
                                                <input type="checkbox" value="'+goodsId+'" rel="off" class="checkBox storeelm_checkbox">\
                                            </div>\
                                        </div>\
                                    </div>'
                    $('#productList').append(goodHtml);
                }
                if(dataMsg.length != 0){
                    DocData.canRenderOrderList()
                }
            }
        })
    };

    //推拿列表
    function tuinaList(serviceName){
        $('#tuinaList').find(".js_storeelm").remove();
        $.ajax({
            url:baseUrl.base+"init/selectInitServiceList",
            type:'get',
            data:{
                serviceName: serviceName,
                state : 1
            },
            success:function(data){
                if(data.code=="0"){
                    var dataMsg = data.results;
                    for(var i=0;i<dataMsg.length;i++){
                        DocData.serviceList.push(dataMsg[i])
                        var serviceImg = dataMsg[i].serviceImg;
                        var serviceName = dataMsg[i].serviceName;
                        var serviceId = dataMsg[i].serviceId;
                        var serviceCost = dataMsg[i].serviceCost;
                        var cardNumber = dataMsg[i].cardNumber;
                        var tuinaHtml ='<div class="col-sm-3 pd_hor5 js_storeelm">\
                                            <div class="row storecnt">\
                                                <div class="col-sm-10 pd_hor5">\
                                                    <p class="tit">'+serviceName+'</p>\
                                                    <p class="tips">￥<span>'+serviceCost+'</span></p>\
                                                </div>\
                                                <div class="col-sm-2 pd_hor5">\
                                                    <input type="checkbox" value="'+serviceId+'" rel="'+dataMsg[i].cardId+'" data-num="'+cardNumber+'"  class="checkBox storeelm_checkbox">\
                                                </div>\
                                            </div>\
                                        </div>'
                        $('#tuinaList').append(tuinaHtml);
                    }
                    DocData.canRenderOrderList()
                }
            }
        })
    }

    /*门店-推拿师*/
    //获取全部门店
    function getStoreList(){
        baseFn.rpSelect('#illSelectleft',{
            url:baseUrl.base+baseUrl.subclinic+'selectSubclinicList',
            idKey:'subclinicId',
            textKey:'subclinicName',
            selFn:function(e){
                DocData.subclinicId=e.params.data.subclinicId
                DocData.doctorId=''
                DocData.bookingInfo.subclinicId = DocData.subclinicId
                DocData.bookingInfo.doctorId = ''
                getDoctor()
            },
            calFn:function(dom,data){
                if(baseFn.notNull(DocData.bookingInfo.bookingId)){
                    DocData.subclinicId=DocData.bookingInfo.subclinicId
                    DocData.doctorId=DocData.bookingInfo.doctorId
                }else{
                    DocData.bookingInfo.subclinicId = DocData.subclinicId
                }
                dom.val(DocData.subclinicId).trigger('change')
                getDoctor()
            }
        })
    }

    //选择推拿师
    function getDoctor(){
        if(baseFn.notNull(DocData.orderId)){
            $('#illSelectRight').prop('disabled',true)
        }
        baseFn.rpSelect('#illSelectRight',{
            url:baseUrl.base+'sysuser/list',
            dataSrc:'results.list',
            data:{subclinicId:DocData.subclinicId,userStatus:0},
            idKey:'userId',
            textKey:'userName',
            selFn:function(e){
                DocData.doctorId=e.params.data.id
                DocData.bookingInfo.doctorId=e.params.data.id
                if(DocData.bookingInfo.canSave && !baseFn.notNull(DocData.orderId)){
                    DocData.upBookingInfo()
                }
            },
            calFn:function(dom,data){
                if(baseFn.notNull(DocData.bookingInfo.bookingId)){
                    DocData.subclinicId=DocData.bookingInfo.subclinicId
                    DocData.doctorId=DocData.bookingInfo.doctorId
                    
                }else{
                    DocData.bookingInfo.doctorId = DocData.doctorId
                }
                dom.val(DocData.doctorId).trigger('change')
                
            }
        })
    }
    /*门店-推拿师*/
    
</script>
</html>